package com.wisezone.demo0210;

import java.io.*;
import java.util.Properties;

public class TestPropers {
    public static void main(String[] args) {
        Properties properties=new Properties();
        File file=new File("E:\\Job\\Git\\java1228\\java_base\\src\\com\\wisezone\\demo0210\\db.properies");
        InputStream in= null;
        try {
            in = new FileInputStream(file);
            properties.load(in);

            String userName=properties.getProperty("user");
            String pass=properties.getProperty("password");

            System.out.println("用户名："+userName);
            System.out.println("密码："+pass);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e){
            e.printStackTrace();
        }finally {

        }

    }
}
